home *** CD-ROM | disk | FTP | other *** search
- /* Just made for debugging */
-
- class righttriangle {
-
- private float height,width,hypot;
-
- public righttriangle(float h,float w) {
-
- height = h;
- width = w;
- hypot = (float)Math.sqrt(w*w + h*h);
- }
-
- public float hypotenuse() {
- return hypot;
- }
- }
-
- class debug {
-
- public static void main (String args[]) {
-
- righttriangle T = new righttriangle(3F,4F);
-
- System.out.println(T.hypotenuse());
-
- }
- }
-
-